{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "def draw_line (tick_length , tick_label =''):\n",
    "    line = '-' * tick_length\n",
    "    if tick_label :\n",
    "        line += ' ' + tick_label\n",
    "    print ( line )\n",
    "def draw_interval ( center_length ):\n",
    "    if center_length > 0: \n",
    "        draw_interval ( center_length - 1) \n",
    "        draw_line ( center_length ) \n",
    "        draw_interval ( center_length - 1)\n",
    "def draw_ruler ( num_inches , major_length ):\n",
    "    draw_line ( major_length , '0') \n",
    "    for j in range (1,1 + num_inches ):\n",
    "        draw_interval ( major_length - 1) \n",
    "        draw_line ( major_length ,str (j))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "1"
      ]
     },
     "execution_count": 7,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.2"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
